package com.inspur.security.cbb3.kms.enums;

/**
 * symmetricKeyContentType
 *
 * @author liukai
 * @date 2020/11/4
 **/
public enum SymmetricKeyFormatType {
    /**
     * 其他
     */
    Other,

    /**
     * 对称密钥内容输出格式
     */
    Hex,

    Base64;

    public static SymmetricKeyFormatType getByType(String type){
        for (SymmetricKeyFormatType constants : values()) {
            if (constants.name().equalsIgnoreCase(type)) {
                return constants;
            }
        }
        return Other;
    }
}
